import {createSSRApp} from "vue";
import App from "./App.vue";
/* 安装引入unocss */
import "uno.css"
/* 安装引入vant */
import Vant from 'vant';
import 'vant/lib/index.css';
/* 安装引入pinia 数据持久化插件 */
import { createPinia } from 'pinia'
const pinia = createPinia()
/* 安装引入VConsole 移动端调试插件 */
import VConsole from 'vconsole'
if (import.meta.env.MODE != 'production') {
	new VConsole();
}
/* 引入自定义函数功能插件 */
import './static/css/app.css'
import { success, msgTo, validToken } from './utils/util'
uni.$success = success
uni.$msgTo = msgTo
uni.$validToken = validToken

export function createApp() {
	const app = createSSRApp(App);
	app.use(pinia)
	app.use(Vant)
	return {
		app,
	};
}
